#include "junix.h"

int main(int argc, char **argv)
{
	if(argc==1)
	{
		fprintf(stderr,"Usage:%s dir\n",argv[1]);
		exit(EXIT_SUCCESS);
	}

	if( chroot(argv[1]) )
	{
		perror("chroot");
		exit(EXIT_FAILURE);
	}

	int ret=system("ls");
	return WEXITSTATUS(ret);
}

